<% row = cycle("even", "odd") %>
<tr class="<%= row %>">
  <td><%= order.id %></td>
  <td><%= order.number %></td>
  <td><%= number_to_currency(order.total) %></td>
  <td><%= order.user_name %></td>
  <td><%= order.user_surname %></td>
  <td><%= order.user_email %></td>
  <td><%= order.state %></td>
  <td><%= raw(l order.completed_at) %></td>
  <td>
    <% permitted_to? :delete, :admin_orders do %>
      <%= button_to_delete "X", admin_order_path(order) %>
    <% end %>
    <% permitted_to? :edit, :admin_orders do %>
      <%= button_to_edit "Editovat", edit_admin_order_path(order) %>
    <% end %>
  </td>
</tr>